package cn.ynrcb.personnelfile.admin.vo;

import cn.ynrcb.personnelfile.admin.enums.SmsTypeEnum;
import cn.ynrcb.personnelfile.common.validator.group.AddGroup;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotNull;
import java.util.List;

public interface SmsVo {
    /**
     * 短信发送参数
     */
    @ApiModel(value = "发送短信参数")
    @Data
    class SendSmsParm{
        /**
         * 手机号
         */
        @ApiModelProperty(value = "手机号", name = "username", example = "13888888888", required = true)
        @NotNull(message="手机号不能为空", groups = {AddGroup.class})
        private String phone;

        /**
         * 验证码的对应标识uuid (发送短信需要图像验证码的才必须)
         */
        @ApiModelProperty(value = "验证码的对应标识uuid", name = "captcha", example = "7e7b00c5-7fae-4752-8ddd-befccdd1c358")
        @NotNull(message="uuid不能为空", groups = {AddGroup.class})
        private String uuid;

        /**
         * 验证码  (发送短信需要图像验证码的才必须)
         */
        @ApiModelProperty(value = "验证码", name = "captcha", example = "np3jg")
        @NotNull(message="验证码不能为空", groups = {AddGroup.class})
        private String captcha;

        /**
         * 类型
         */
        @ApiModelProperty(value = "类型", name = "type", example = "1", required = true)
        @NotNull(message="类型不能为空", groups = {AddGroup.class})
        private SmsTypeEnum type;

    }

    /**
     * 检查短信验证码参数
     */
    @ApiModel(value = "检查短信验证码参数")
    @Data
    class CheckSmsParm{
        /**
         * 手机号
         */
        @ApiModelProperty(value = "手机号", name = "username", example = "13888888888", required = true)
        @NotNull(message="手机号不能为空", groups = {AddGroup.class})
        private String phone;

        /**
         * 短信验证码
         */
        @ApiModelProperty(value = "短信验证码", name = "smsCode", example = "546872")
        @NotNull(message="短信验证码不能为空", groups = {AddGroup.class})
        private String smsCode;

        /**
         * 类型
         */
        @ApiModelProperty(value = "类型", name = "type", example = "3", required = true)
        @NotNull(message="类型不能为空", groups = {AddGroup.class})
        private SmsTypeEnum type;
    }

    /**
     * 短信通知参数
     */
    @ApiModel(value = "短信通知参数")
    @Data
    class NoticeSmsParm{
        /**
         * 手机号
         */
        @ApiModelProperty(value = "手机号", name = "username", example = "13888888888", required = true)
        @NotNull(message="手机号不能为空", groups = {AddGroup.class})
        private String phone;

        /**
         * 短信内容
         */
        @ApiModelProperty(value = "短信内容", name = "content", example = "该短信")
        @NotNull(message="短信内容不能为空", groups = {AddGroup.class})
        private String content;

        /**
         * 短信类型
         */
        private SmsTypeEnum smsType;
    }

    /**
     * 催报短信通知参数
     */
    @ApiModel(value = "催报短信通知参数")
    @Data
    class RemindNoticeSmsParm{
        /**
         * 手机号list
         */
        private List<String> mobiles;

        /**
         * 短信内容list
         */
        private List<String> contents;

        /**
         * 短信类型
         */
        private SmsTypeEnum smsType;
    }
}
